package com.wangjiang.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wangjiang.common.map.BaseMapper;
import com.wangjiang.model.CompanyModel;
import com.wangjiang.service.CompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service(value = "companyService")
public class CompanyServiceImpl implements CompanyService {
    @Autowired
    private BaseMapper<CompanyModel> baseMapper;

    @Override
    public PageInfo<CompanyModel> findAllCompany(int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<CompanyModel> userList = baseMapper.selectAll();
        PageInfo result = new PageInfo(userList);
        return result;
    }
}
